
package Merlion.CRM.bean;


import javax.ejb.Remote;


@Remote
public interface SalesOrderProcessingModuleRemote {


    public java.lang.String removeLineEntry(java.lang.Long id, java.lang.Long productId);
    
    public java.lang.String updateLineEntry(java.lang.Long id, int indicativeLeadTime, int invoiced, int shipped);

    public java.lang.String deleteSalesInquiry(java.lang.Long id);

    public java.lang.String deleteQuotation(java.lang.Long id);

    public java.lang.String deletePurchaseOrder(java.lang.Long id);

    public java.lang.String updatePurchaseOrderStatus(java.lang.Long id, java.lang.String status);

    public java.lang.String deleteSalesOrder(java.lang.Long id);

    public java.util.List<Merlion.util.state.SalesDocumentState> viewSalesInquiries();

    public java.util.List<Merlion.util.state.SalesDocumentState> viewQuotations();

    public java.lang.Long addQuotation(java.util.Date dateIssued, java.lang.Long clientId, Long contactId,  
            java.util.Date validUntil, java.util.List<Merlion.util.state.LineEntryState> products, 
            String description, String docName, String pricingType);

    public java.util.List<Merlion.util.state.SalesDocumentState> viewPurchaseOrders();

    public java.lang.Long addSalesInquiry(java.util.Date dateIssued, java.lang.Long clientId, Long contactId, 
            java.util.List<Merlion.util.state.LineEntryState> products, 
            String description, String documentName, String pricingType);

    public java.util.List<Merlion.util.state.SalesDocumentState> viewSalesOrders();

    public java.util.List<Merlion.util.state.LineEntryState> viewProductListforSalesDocument(java.lang.Long id);

    public java.util.List<Merlion.util.state.ProductState> viewProductList();


    public double getBasePrice(java.lang.Long id);

    public int getLeadTime(Long salesDocId, Long itemId, int demand, int bufferDays, int indicativeLeadTime, boolean reserve);

    public Long convertPurchaseOrderToSalesOrder(java.lang.Long poId, String soName, String soDesc);

    public Long convertQuotationToPurchaseOrder(java.lang.Long quotationId, 
            Long billingId, Long shippingId, 
            java.lang.String description, java.util.Date dueDate, java.lang.String docName, 
            java.lang.String shippingMethod, java.lang.String shippingRule, 
            java.lang.String invoiceRule, java.lang.String paymentMethod, 
            java.lang.String freightCostRule, java.lang.String currency);


    public java.lang.String editPurchaseOrder(java.lang.Long id, java.util.Date dateIssued, 
            java.lang.Long clientId,Long contactId,  java.lang.Long quotationId, java.lang.String status, 
             java.lang.String description, java.util.Date dueDate, java.lang.String docName, 
            java.lang.String shippingMethod, java.lang.String shippingRule, java.lang.String invoiceRule, 
            java.lang.String paymentMethod, java.lang.String freightCostRule, java.lang.String currency,
            Long billingId, Long shippingId);

    public void editSalesOrder(java.lang.Long id, java.util.Date dateIssued, java.lang.Long clientId, 
            Long contactId, java.lang.Long poId, java.lang.String status, java.lang.String ATPCheckStatus, java.lang.String creditCheckStatus, 
           java.lang.String description, 
            java.util.Date dueDate, java.lang.String docName, java.lang.String shippingMethod, 
            java.lang.String shippingRule, java.lang.String invoiceRule, java.lang.String paymentMethod, 
            java.lang.String priority, java.lang.String freightCostRule, java.lang.String currency, 
            Long billingId, Long shippingId);

    public java.lang.String editSalesInquiry(java.lang.Long id, java.util.Date dateIssued, java.lang.Long clientId, java.lang.String status, java.lang.String description, java.lang.String docName);

    public java.lang.String convertInquiryToQuotation(java.lang.Long id,double discount, java.util.Date validUntil, java.lang.String docName, String desc);

    public java.lang.String editQuotation(java.lang.Long id, java.util.Date dateIssued, java.lang.Long clientId, java.util.Date validUntil, 
            int indicativeLeadTime, java.lang.String description, java.lang.String docName, String status);

    public double getTotalPrice(Merlion.CRM.entity.LineEntryEntity lineEntry, java.lang.String type);

    public void createPriceBook(String name, java.lang.Long productId, double[][] arr);

    public double getListPrice(int quantity, java.lang.String type, Long pricebookID);

    public java.util.List<Merlion.CRM.entity.PricebookEntity> getPricebook(java.lang.Long id);

    public java.util.List<Merlion.CRM.entity.PricebookEntity> getPricebookList();

    public Merlion.util.state.ProductState searchProduct(java.lang.Long id);

    public Merlion.util.state.ClientState searchClient(java.lang.Long id);

    public double getTotalPrice(Merlion.util.state.LineEntryState lineEntry, java.lang.String type);

    public java.lang.String editLineEntry(java.lang.Long id, int quantity, double price, java.lang.String type);

    public Merlion.util.state.SalesDocumentState searchQuotation(java.lang.Long id);

    public java.util.List<Merlion.util.state.AddressState> getBillingAddressList();

    public java.util.List<Merlion.util.state.AddressState> getShippingAddressList();

    public Merlion.util.state.AddressState searchShippingAddress(java.lang.Long id);

    public Merlion.util.state.AddressState searchBillingAddress(java.lang.Long id);

    public Merlion.util.state.SalesDocumentState searchPurchaseOrder(java.lang.Long cid);

    public java.util.List<Merlion.util.state.SalesDocumentState> viewQuotationsforPO();

    public java.util.List<Merlion.util.state.SalesDocumentState> viewPurchaseOrdersforSO();

    public java.lang.Long addPurchaseOrder(java.util.Date dateIssued, java.lang.Long clientId, 
            Long contactId, java.util.List<Merlion.util.state.LineEntryState> products, java.lang.Long quotationId, 
            Long billingId, Long shippingId, 
            java.lang.String description, java.util.Date dueDate, java.lang.String docName, java.lang.String shippingMethod, 
            java.lang.String shippingRule, java.lang.String invoiceRule, java.lang.String paymentMethod, 
            java.lang.String freightCostRule, java.lang.String currency, java.lang.String pricingType);

    public java.lang.Long addSalesOrder(java.util.Date dateIssued, java.lang.Long clientId, 
            Long contactId, java.util.List<Merlion.util.state.LineEntryState> products, java.lang.Long poId, 
            Long billingId, Long shippingId, 
            java.lang.String description, java.util.Date dueDate, java.lang.String docName, java.lang.String shippingMethod, 
            java.lang.String shippingRule, java.lang.String invoiceRule, java.lang.String paymentMethod, 
            java.lang.String priority, java.lang.String freightCostRule, java.lang.String currency, 
            java.lang.String pricingType);

    public java.util.List<Merlion.util.state.SalesDocumentState> viewConvertedInquiries();

    public java.util.List<Merlion.util.state.SalesDocumentState> viewConvertedQuotations();

    public java.util.List<Merlion.util.state.SalesDocumentState> viewConvertedPurchaseOrders();

    public java.util.List<Merlion.util.state.DeliveryOrderState> viewDeliveryOrders();

    public java.util.List<Merlion.util.state.LineEntryState> viewProductListforDeliveryOrder(java.lang.Long id);
    
    public Merlion.util.state.SalesDocumentState searchSalesOrder(java.lang.Long sid);

    public void requestRefund(java.lang.Long customerId, java.lang.Long salesOrderId);

    public void requestForCreditCheck(java.lang.Long customerId, java.lang.Long salesOrderId);

    public void informCashInAdvancePayment(java.lang.Long customerId, java.lang.Long salesOrderId);

    public void requestForInvoice(java.lang.Long customerId, java.lang.Long salesOrderId);

    public java.util.List<Merlion.util.state.SalesDocumentState> viewApprovedSalesOrders();

    public java.util.List<Merlion.util.state.PricebookState> getPricebookStateList();

    public java.util.List<Merlion.util.state.PricebookState> getPricebookState(java.lang.Long id);

    public java.util.List<Merlion.util.state.PricebookEntryState> getPricebookEntry(java.lang.Long id);

    public void editPricebookEntry(java.lang.Long pricebookId, int number, int low, int high, double directPrice, double wholesalePrice);

    public void createPricebook2(java.lang.String name, java.lang.Long productId, java.util.List<Merlion.util.state.PricebookEntryState> entryList);

    public void deletePricebook(java.lang.Long pricebookId);

    public java.util.List<Merlion.util.state.SalesDocumentState> viewSalesOrdersForDO();

    public java.lang.Long convertPurchaseOrderToSalesOrder2(java.lang.Long poId, java.lang.String soName, java.lang.String soDesc);

    public java.lang.String approvePurchaseOrder(java.lang.Long id);

    public Merlion.util.state.SalesDocumentState searchInquiry(java.lang.Long id);

    public void checkSalesDocumentValidity();

    public void addShippingGroup(java.lang.Long doId, java.lang.Long contactId, java.lang.String shippingMethod, java.lang.String shippingRule, java.lang.String freightCostRule, java.lang.Long billingId, java.lang.Long shippingId, java.util.List<Merlion.util.state.LineEntryState> le);

  
}
